<template>
  <div class="nav">
    <img class="logo" src="@/assets/logo2.png" alt="" />
    <div class="title">原相星球</div>

    <!-- 搜索框 -->
    <div class="search">
      <input
        type="text"
        class="input"
        placeholder="请输入你要搜索的内容..."
        autocomplete="off"
      />
      <input class="button--submit" value="搜索" type="submit" />
    </div>
    <button class="pub">发布 bui~</button>
    <img class="my-photo" src="@/assets/nacos.jpg" alt="" />
  </div>
</template>

<script>
export default {};
</script>

<style scoped>
.nav {
  width: 100%;
  height: 80px;
  padding: 15px;
  display: flex;
  justify-content: left;
  align-items: center;
}

.nav .logo {
  width: 50px;
  margin: 0 10px;
  border-radius: 25px;
}

.nav .title {
  font-weight: 600;
  width: 150px;
}

.nav .my-photo {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  margin-left: 30px;
}

/* -------------搜索框-------------- */

.search {
  display: flex;
  align-items: center;
  width: 1000px;
  padding-left: 700px;
}

.input {
  min-height: 50px;
  max-width: 200px;
  padding: 0 1rem;
  color: #fff;
  font-size: 15px;
  border: 1px solid #5e4dcd;
  border-radius: 6px 0 0 6px;
  background-color: transparent;
}

.button--submit {
  min-height: 50px;
  padding: 0.5em 1em;
  border: none;
  border-radius: 0 6px 6px 0;
  background-color: #5e4dcd;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.button--submit:hover {
  background-color: #5e5dcd;
}

.input:focus,
.input:focus-visible {
  border-color: #3898ec;
  outline: none;
}

/* --------------------------- */

/* -------------发布------------- */
.pub {
  text-decoration: none;
  position: relative;
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  width: 150px;
  height: 3em;
  line-height: 2em;
  text-align: center;
  background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
  background-size: 300%;
  border-radius: 10px;
  z-index: 1;
}

.pub:hover {
  animation: ani 8s linear infinite;
  border: none;
}

@keyframes ani {
  0% {
    background-position: 0%;
  }

  100% {
    background-position: 400%;
  }
}

.pub:before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  z-index: -1;
  background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
  background-size: 400%;
  border-radius: 10px;
  transition: 1s;
}

.pub:hover::before {
  filter: blur(20px);
}

.pub:active {
  background: linear-gradient(32deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
}

/* --------------------------- */
</style>